package com.domain;

import javax.validation.constraints.NotNull;
import lombok.Data;

/**
*@Author: 喻晓涵
*@CreateTime: 2025-08-05
*@Description: ${description}
*@Version: 1.0
*/


/**
 * 用户作答记录表
 */
@Data
public class UserAnswer implements java.io.Serializable{
    /**
     * 主键ID
     */
    @NotNull(message = "主键ID不能为null")
    private Long id;

    /**
     * 关联的试卷ID
     */
    @NotNull(message = "关联的试卷ID不能为null")
    private Long examId;

    /**
     * 关联的试卷题目ID
     */
    @NotNull(message = "关联的试卷题目ID不能为null")
    private Long examQuestionId;

    /**
     * 选择的答案ID
     */
    private Long answerId;

    // Getter 和 Setter 方法
    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getExamId() {
        return examId;
    }

    public void setExamId(Long examId) {
        this.examId = examId;
    }

    public Long getExamQuestionId() {
        return examQuestionId;
    }

    public void setExamQuestionId(Long examQuestionId) {
        this.examQuestionId = examQuestionId;
    }

    public Long getAnswerId() {
        return answerId;
    }

    public void setAnswerId(Long answerId) {
        this.answerId = answerId;
    }
    //tostring
    @Override
    public String toString() {
        return "ExamPaperQuestionAnswer{" +
                "id=" + id +
                ", examId=" + examId +
                ", examQuestionId=" + examQuestionId +
                ", answerId=" + answerId +
                '}';
    }
}